package com.study.happystudy.controller;

import com.study.happystudy.service.impl.SmsServiceImpl;
import com.study.happystudy.tool.SmsUtil;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
public class SmsController {

    @Resource
    SmsServiceImpl smsService;
    @PostMapping("SendSms")
    public String SendSms(String phone) {
        return smsService.SendSms(phone);
    }

    @PostMapping("VerifySms")
//验证手机号验证码
    public String VerifySms(String phone, String verCode) {
        return smsService.VerifySms(phone, verCode);
    }
}
